CHILD_PROP_Y
};
-static void gtk_fixed_realize (GtkWidget *widget);
static void gtk_fixed_measure (GtkWidget *widget,
GtkOrientation orientation,
int for_size,
widget_class = (GtkWidgetClass*) class;
container_class = (GtkContainerClass*) class;
- widget_class->realize = gtk_fixed_realize;
widget_class->measure = gtk_fixed_measure;
widget_class->size_allocate = gtk_fixed_size_allocate;
widget_class->snapshot = gtk_fixed_snapshot;
{
fixed->priv = gtk_fixed_get_instance_private (fixed);
- gtk_widget_set_has_window (GTK_WIDGET (fixed), FALSE);
-
fixed->priv->children = NULL;
+
+ gtk_widget_set_has_window (GTK_WIDGET (fixed), FALSE);
}
/**
}
}
-static void
-gtk_fixed_realize (GtkWidget *widget)
-{
- GtkAllocation allocation;
- GdkWindow *window;
-
- if (!gtk_widget_get_has_window (widget))
- GTK_WIDGET_CLASS (gtk_fixed_parent_class)->realize (widget);
- else
- {
- gtk_widget_set_realized (widget, TRUE);
-
- gtk_widget_get_allocation (widget, &allocation);
-
- window = gdk_window_new_child (gtk_widget_get_parent_window (widget),
- GDK_ALL_EVENTS_MASK,
- &allocation);
- gtk_widget_set_window (widget, window);
- gtk_widget_register_window (widget, window);
- }
-}
-
static void
gtk_fixed_measure (GtkWidget *widget,
GtkOrientation orientation,
GtkRequisition child_requisition;
GList *children;
- if (gtk_widget_get_has_window (widget))
- {
- if (gtk_widget_get_realized (widget))
- gdk_window_move_resize (gtk_widget_get_window (widget),
- allocation->x,
- allocation->y,
- allocation->width,
- allocation->height);
- }
-
for (children = priv->children; children; children = children->next)
{
child = children->data;
child_allocation.x = child->x;
child_allocation.y = child->y;
- if (!gtk_widget_get_has_window (widget))
- {
- child_allocation.x += allocation->x;
- child_allocation.y += allocation->y;
- }
-
child_allocation.width = child_requisition.width;
child_allocation.height = child_requisition.height;
gtk_widget_size_allocate (child->widget, &child_allocation);